<h1>史上超级无敌留言板</h1>
<form action="/msg/index" method="get">
    <input type="hidden" name="_token" value="<?php echo csrf_token();?>">
关键字：<input type="text" name="keyword">
        <input type="submit" value="搜索">
</form>
<?php print_r("<font color='#FF1493'>".session()->get('username')."</font>"."已登录&nbsp;&nbsp;");?>
<a href="/msg/add">添加数据</a>
<table border="1">
    <tr>
        <td>ID</td>
        <td>标题</td>
        <td>内容</td>
        <td>图片</td>
        <td>操作</td>
    </tr>
    <?php foreach ($msg as $v) {?>
    <tr>
        <td><?php echo $v->id;?></td>
        <td><?php echo $v->title;?></td>
        <td><?php echo $v->content;?></td>
        <td><img src="{{URL::asset(''.$v->img.'')}}" height="50" width="50"></td>
        <td>
            <a href="/msg/up/<?php echo $v->id;?>">修改</a>
            <a href="/msg/del/<?php echo $v->id?>"><font color="red">删除</font></a>
        </td>
    </tr>
    <?php } ?>
</table>
<style type="text/css">
    .pagination li{float:left;margin: 1px;list-style: none;}
</style>
{!! $msg->appends(['keyword'=>$keyword])->render() !!}
